#include <iostream>
#include <cstdlib>
#include <string.h>
#include "common_values.h"

using namespace std;

int getActionType(char * action)
{
  if (not strncmp(action,DELETE,ACTION_SIZE))
    return DELETE_NUMBER;
  if (not strncmp(action,DOWNLOAD,ACTION_SIZE))
    return DOWNLOAD_NUMBER;
  if (not strncmp(action,LIST,ACTION_SIZE))
    return LIST_NUMBER;
  if (not strncmp(action,RENAME,ACTION_SIZE))
    return RENAME_NUMBER;
  if (not strncmp(action,QUIT,ACTION_SIZE))
    return QUIT_NUMBER;
  if (not strncmp(action,UPLOAD,ACTION_SIZE))
    return UPLOAD_NUMBER;
  return ERROR_NUMBER;
}
